
package models.spider.parser.aaa.rdf;

import javax.xml.bind.annotation.XmlAttribute;

/**
 * 
 * @author laurent@opprecht.info
 */
public class Type {

    @XmlAttribute(name = "resource", namespace = "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
    String value = null;

    public boolean isSpace() {
        if (value == null) {
            return false;
        }
        return value.toLowerCase().indexOf("space") >= 0;
    }

    public boolean isActor() {
        if (value == null) {
            return false;
        }
        return value.toLowerCase().indexOf("actor") >= 0 || value.toLowerCase().indexOf("person") >= 0;
    }

    public boolean isActivity() {
        if (value == null) {
            return false;
        }
        return value.toLowerCase().indexOf("activity") >= 0;
    }

    public boolean isAsset() {
        if (value == null) {
            return false;
        }
        return value.toLowerCase().indexOf("asset") >= 0;
    }

    @Override
    public String toString() {
        return value;
    }

}
